package com.anavigate;
import android.util.AttributeSet;
import android.view.View;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Paint;
import android.util.Log;


public class MapView  extends View {
	private final Paint mPaint = new Paint();
	private final String TAG = "MapView";
	private Bitmap mbMap = null;
	public MapView(Context context, AttributeSet attrs)
	{
		super(context, attrs);
	}
	public MapView(Context context, AttributeSet attrs, int defStyle) 
	{
        super(context, attrs, defStyle);
	}
	public void setMapPicture(Bitmap bm)
	{	
		mbMap = bm ;
		invalidate();
	}
	@Override
	public void onDraw(Canvas canvas)
	{
		super.onDraw(canvas);
		Log.i(TAG,"onDraw()");
		//Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(),
	    //           R.drawable.icon);
		if(mbMap != null)
		{
			canvas.drawBitmap(mbMap, 0, 0, mPaint);
		}
	}
}
